perm filename DVI1ED.CH[ARK,TEX] blob sn#769063 filedate 1984-09-05 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00008 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	@x Tell WEAVE to print only the changes:
C00003 00003	@x Specify compiler directives:
C00004 00004	@x add one to page number
C00005 00005	@x Opening packed binary input files:
C00006 00006	@x Opening packed binary input files:
C00007 00007	@x another place to add one to the page number
C00008 00008	@x Remove any Score directory name
C00010 ENDMK
C⊗;
@x Tell WEAVE to print only the changes:
\pageno=\contentspagenumber \advance\pageno by 1
@y
\def\botofcontents{\vfill
\centerline{(This listing shows the changes for {\sc WAITS} only)}}
\let\maybe=\iffalse
\pageno=\contentspagenumber \advance\pageno by 1
@z
@x Specify compiler directives:
@p program DVI1ED(@!dvi_in_file,@!dvi_out_file,@!output);
@y
@p @t\4@>@{$D+,W+@} {no debugging overhead}
program DVI1ED(@!dvi_in_file,@!dvi_out_file,@!output);
@z
@x add one to page number
do_bop: begin
   bop_loc←out_cur_loc;
   put_byte(DVI_cmd);
   for i←1 to DVI_copy[DVI_cmd] do
      begin DVI_byte←get_byte; put_byte(DVI_byte); end;
   i←signed_quad;  {ignore back pointer}
   put_quad(prev_bop_loc);
   prev_bop_loc←bop_loc;
   end;
@y
do_bop: begin
   bop_loc←out_cur_loc;
   put_byte(DVI_cmd);
   t←signed_quad; put_quad(t+1); {page number+1}
   for i←5 to DVI_copy[DVI_cmd] do
      begin DVI_byte←get_byte; put_byte(DVI_byte); end;
   i←signed_quad;  {ignore back pointer}
   put_quad(prev_bop_loc);
   prev_bop_loc←bop_loc;
   end;
@z
@x Opening packed binary input files:
@p procedure open_in_dvi_file; {prepares to read packed bytes in |dvi_in_file|}
begin reset(dvi_in_file);
in_cur_loc←0;
end;
@#
procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
begin reset(tfm_file,cur_name);
end;
@y
@p procedure open_in_dvi_file; {prepares to read packed bytes in |dvi_in_file|}
begin reset(dvi_in_file,'','/B:8');
in_cur_loc←0;
end;
@#
procedure open_tfm_file; {prepares to read packed bytes in |tfm_file|}
begin reset(tfm_file,cur_name,'/B:8/O/N:9');
end;
@z
@x Opening packed binary input files:
@p procedure open_out_dvi_file; {prepares to write packed bytes into |dvi_out_file|}
begin rewrite(dvi_out_file);
out_cur_loc←0;
end;
@y
@p procedure open_out_dvi_file; {prepares to write packed bytes into |dvi_out_file|}
begin rewrite(dvi_out_file,'','/B:8');
out_cur_loc←0;
end;
@z
@x another place to add one to the page number
	page_no[in_page_count]←signed_quad;
@y
	page_no[in_page_count]←signed_quad+1;
@z
@x Remove any Score directory name
@ @<Process font name@>=
{do not use |k| here}
n←get_byte;
put_byte(n);
print(' ');
for i←1 to n do
    begin
    in_font_name[i]←get_byte;
    print(xchr[in_font_name[i]]);
    if font_used[f]←put_byte(in_font_name[i]);
    end;
@y
@ Default Directory

@d default_directory_name=='ALFfonts:' {change this to the correct name}
@d default_directory_name_length=9 {change this to the correct length}

@<Glob...@>=
@!default_directory:packed array[1..default_directory_name_length] of char;

@ @<Set init...@>=
default_directory←default_directory_name;

@ @<Process font name@>=
{do not use |k| here}
n←get_byte;
p←1; {starting location}
print(' ');
for i←1 to n do
    begin
    in_font_name[i]←get_byte;
    print(xchr[in_font_name[i]]);
    if (in_font_name[i]=ord('>')) or (in_font_name[i]=ord(':'))
       then p←i+1;
    end;
if font_used[f] then begin
    put_byte(default_directory_name_length+n-p+1);
    for i←1 to default_directory_name_length do
	put_byte(ord(default_directory[i]));
    for i←p to n do
	put_byte(in_font_name[i]);
    end;

@z